// ExceptionPrivInstruction.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <STDLIB.H>
#include <Windows.h>

int main(int argc, char* argv[])
{
	printf("Hello World!\n");
	long result = 0;
	__try
	{
		__asm
		{
			in eax, 0x14
			mov result, eax
		}
		printf("In VM");
		if (result != 0)
		{
			//printf("In VM");
		}
		system("pause");
	}
	__except(EXCEPTION_EXECUTE_HANDLER)
	{
		printf("Not in VM");
		system("pause");
	}
	return 0;
}

